/**
 * 编写实体
 */

import {
  Entity,
  Column,
  PrimaryGeneratedColumn,
  CreateDateColumn,
  Generated
} from 'typeorm'

@Entity()
export class Girl {
  // 主键装饰器
  @PrimaryGeneratedColumn('uuid')
  id: number

  // 设置name字段的类型和长度
  @Column({ type: 'varchar', length: 32, comment: '姓名' })
  name: string

  @Column({ type: 'varchar', length: 100, comment: '技能' })
  skill: string

  @CreateDateColumn({ type: 'timestamp', comment: '创建时间' })
  createTime: Date

  @CreateDateColumn({ type: 'timestamp', comment: '更新时间' })
  updateTime: Date

  // 生成不规则，不重复的自动编号
  @Generated('uuid')
  uuid: string
}
